import Vue from 'vue'
import App from './App.vue'
import router from './router/index.js';
import store from './store/index.js';

import './styles/global.less';
// import './mock/index.js';

import showMessage from './utils/showMessage.js';

import vLoading from './directives/loading.js';
import vLazy from './directives/lazy.js';
import eventBus from './eventBus.js';

Vue.prototype.$showMessage = showMessage;
Vue.prototype.$bus = eventBus;
Vue.directive("loading", vLoading);
Vue.directive("lazy", vLazy);

store.dispatch("setting/fetchData");

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')
